package com.audaque.springboot.foshanupload.web.webdemo.controller;

import com.audaque.springboot.foshanupload.core.model.qo.page.Page;
import com.audaque.springboot.foshanupload.web.webdemo.mapper.PersonMapper;
import com.audaque.springboot.foshanupload.web.webdemo.mapper.StudentMapper;
import com.audaque.springboot.foshanupload.web.webdemo.model.domain.Person;
import com.audaque.springboot.foshanupload.web.webdemo.model.domain.Student;
import com.audaque.springboot.foshanupload.web.webdemo.model.dto.PersonDTO;
import com.audaque.springboot.foshanupload.web.webdemo.model.dto.StudentDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;
import java.util.List;

@Slf4j
@RestController
@RequestMapping("mapstruct")
public class MapstructController {
    @Autowired
    StudentMapper studentMapper;

    @RequestMapping("directMemoryOver")
    public void directMemoryOver() {
        Person person = new Person();
        person.setAge(18);
        person.setName("张三");
        person.setHeight(170.5);
        person.setSource(new BigDecimal("100"));

        PersonDTO dto = PersonMapper.INSTANCT.conver(person);

        System.out.println(dto);




    }
}
